// @mxmlc -library-path+=../../fcon.swc -includes net.ws.fcon.ConsoleImpl
/**
* @author maze | guavestudios.com
* @license MIT License see LICENSE.TXT
* @version 0.1
*/
package
{
	import flash.display.Sprite;
	
	public class Main extends flash.display.Sprite
	{
		public function Main():void
		{
			//to open the console press: ^
			
			//Set the stage for console
			Console.setStage(stage);
			
			//do first trace
			Console.trace("ready");
			
			//do first execute of a command
			Console.execute("print This is a Test output");
			
			//create your custom command
			var sample:SampleCommand=new SampleCommand();
			sample.setAction(doAction);
			
			// load your command with ArraySyntax
			Console.execute(["loadCommand",sample]);
			
			//then execute it in console
			//type in the input field sample
			
			
			//type in the input box: align center
			//to reset: align top
			
			
			//More usage:
			/**
			* Notice: the input box MUST be selected. (DEFAULT SELECTED)
			* Press ENTER to execute a typed in command
			* Press key_up and key_down to scroll in the command history
			* Press page_up and page_down for scrolling the output list
			* Press shift+page_up or shift+page_down for top or bottom scroll
			* Press TAB and you can see a list of available commands
			* Type pr in an press TAB and it will complete the command
			* Press ^ again to close the console
			* 
			* 
			*/
		}
		public function doAction()
		{
			this.graphics.beginFill(0xFF0000);
			this.graphics.drawCircle(150,150,50);
			this.graphics.drawCircle(150-25,130,10);
			this.graphics.drawCircle(150+25,130,10);
			this.graphics.moveTo(120,170);
			this.graphics.curveTo(150,200,180,170);
			this.graphics.endFill();
		}
	}
}